home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 October / Chip Ekim 2003.iso / prog / share / tod / setup.exe / hiscore.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-12  |  948 b   |  34 lines

  1. #ifndef PINEIGHT_HISCORE_H
  2. #define PINEIGHT_HISCORE_H
  3.  
  4. #include <allegro.h>
  5.  
  6. typedef struct HiGame
  7. {
  8.   unsigned long gameID;  /* crc32 of game name */
  9.   unsigned long when;  /* minutes (not seconds) since 1970;
  10.                          will fail after y10k */
  11.   unsigned long duration;  /* seconds of game time */
  12.   unsigned int r1;  /* reserved for future use */
  13.   int score[8];  /* records are sorted on descending score[0] */
  14. } HiGame;
  15.  
  16. /* InitScore() *************************
  17.  * Initializes the high score system.
  18.  */
  19. int InitScore(DATAFILE *dat);
  20.  
  21. /* AddScore() **************************
  22.  * Adds a score to a user's personal high score list.  Returns 0 for
  23.  * success or -1 for failure.
  24.  */
  25. int AddScore(const HiGame *game);
  26.  
  27. /* Login() *****************************
  28.  * Logs a user in.  Returns 0 for success or -1 for exit program.
  29.  * ASSUMES: Screen is set to 320x200x8
  30.  */
  31. int Login(char *aimsn);
  32.  
  33. #endif
  34.